/**  
 * All rights Reserved, Designed By <a href="www.itttq.com" target="_blank">www.itttq.com</a>
 * @date:   2017-07-21 11:42:21
 * @Copyright: 2017 <a href="www.itttq.com" target="_blank">www.itttq.com</a> Inc. All rights reserved. 
 */
package com.itttq.gshop.pbpm.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Lang;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import com.itttq.gshop.domain.po.SysFloorImgPo;
import com.itttq.gshop.pbpm.cmpt.mybatis.CustomInLanguage;
import com.itttq.gshop.pbpm.provider.SysFloorImgSqlProvider;

@Mapper
public interface ISysFloorImgMapper {
	/**
	 * 新增SysFloorImgPo对象
	 * 
	 * @param SysFloorImgPo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@InsertProvider(type=SysFloorImgSqlProvider.class,  method="addSysFloorImg") 
	public Integer addSysFloorImg(SysFloorImgPo sysFloorImg);

	/**
	 * 更新SysFloorImgPo对象
	 * 
	 * @param sysFloorImgPo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@UpdateProvider(type=SysFloorImgSqlProvider.class,  method="updateSysFloorImg") 
	public Integer updateSysFloorImg(SysFloorImgPo sysFloorImg);
	
	/**
	 * 根据ID删除SysFloorImgPo对象
	 * 
	 * @param id
	 * @Author 迷蝶
	 * @return Integer
	 */
	@DeleteProvider(type=SysFloorImgSqlProvider.class,  method="delSysFloorImg") 
	public Integer delSysFloorImgById(Integer id);

	/**
	 * 根据IDS删除SysFloorImgPo对象
	 * 
	 * @param ids
	 * @Author 迷蝶
	 * @return List<SysFloorImgPo>
	 */
	@Lang(CustomInLanguage.class)
	@Delete("DELETE FROM sys_floor_img WHERE id IN (#{ids})")
	public Integer delSysFloorImgByIds(@Param("ids") List<Integer> ids);
	
	/**
	 * 根据条件查找SysFloorImgPo对象，默认根据ID降序
	 * 
	 * @param sysFloorImgPo
	 * @Author 迷蝶
	 * @return List<SysFloorImgPo>
	 */
	@SelectProvider(type=SysFloorImgSqlProvider.class,  method="findSysFloorImgs") 
	public List<SysFloorImgPo> findSysFloorImgs(SysFloorImgPo sysFloorImg);
	
	/**
	 * 根据条件查找记录总数
	 * 
	 * @param sysFloorImgPo
	 * @Author 迷蝶
	 * @return Integer
	 */
	@SelectProvider(type=SysFloorImgSqlProvider.class,  method="findSysFloorImgCount") 
	public Integer findSysFloorImgCount(SysFloorImgPo sysFloorImg);

	/**
	 * 根据ID查找SysFloorImgPo对象
	 * 
	 * @param id
	 * @Author 迷蝶
	 * @return SysFloorImgPo
	 */
	@SelectProvider(type=SysFloorImgSqlProvider.class,  method="findSysFloorImgById") 
	public SysFloorImgPo findSysFloorImgById(Integer id);

	/**
	 * 根据楼层ID集合查询楼层图片数据
	 * 
	 * @param floorIds	楼层ID集合
	 * @Author 迷蝶
	 * @return List<SysFloorImgPo>
	 */
	@Lang(CustomInLanguage.class)
	@Select("SELECT * FROM sys_floor_img WHERE floor_id IN (#{floorIds}) order by display_order desc,update_time desc")
	public List<SysFloorImgPo> findFloorImgsByFloorIds(@Param("floorIds") final List<Integer> floorIds);
}